package com.blb.edupayservice.service;

import com.google.zxing.WriterException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * 微信支付接口
 */
public interface IWXPayService {

    /**
     * 微信下单
     * @param userId
     * @param courseId
     * @param activityId
     * @param price
     * @return
     */
    Map<String,String> makeWxOrder(Long userId,Long courseId,Long activityId,Long price) throws Exception;

    /**
     * 生成二维码
     * @param url
     * @param response
     */
    void makeQRCode(String url, HttpServletResponse response) throws Exception;

    /**
     * 检查订单状态
     */
    String checkWxOrder(String tradeNo) throws Exception;

    /**
     * 微信支付成功回调
     * @param request
     * @param response
     * @throws Exception
     */
    void wxpayCallback(HttpServletRequest request, HttpServletResponse response) throws Exception;
}
